const jkl = require("@/static/workBench/jifenlan.png");
const jkc = require("@/static/workBench/jiangkoucheng@2x.png");
const sph = require("@/static/workBench/shenpihong@2x.png");
const jfl = require("@/static/workBench/jifenlan@2x.png");
const sjq = require("@/static/workBench/shijianqv_icon@2x.png");
const rw = require("@/static/workBench/renwu_icon@2x.png");
function getHtml(key,list){
  const item = localStorage.getItem('endlist');
  let htmlStr = '';
  switch (key){
    case 1 :
      htmlStr = `<div   class="cell" >
      <div class="integral_wrap">
        <div class="integral_content"><img src='${jkl}'style="width:4px;height:12px;margin:0 4px 0 0"/>我的积分</div>
        <van-grid square :border="false" :column-num=5 class="flex_wrap" >
          <van-grid-item class="items">
              <span class="fontWrap">${list.myPoints.target}</span><br/>
              <span >目标</span>
          </van-grid-item>
          <van-grid-item class="items">
              <span class="fontWrap">${list.myPoints.sameMonth}</span><br/>
              <span >当月</span>
          </van-grid-item>
          <van-grid-item class="items">
              <span class="fontWrap">${list.myPoints.ability}</span><br/>
              <span>能力</span>
          </van-grid-item>
          <van-grid-item class="items">
              <span class="fontWrap">${list.myPoints.comprehensive}</span><br/>
              <span>综合</span>
          </van-grid-item>
          <van-grid-item class="items">
              <span class="fontWrap">${list.myPoints.dingDing}</span><br/>
              <span>钉钉</span>
          </van-grid-item>
        </van-grid>
      </div>
      </div >`
      break;
      case 2 :
      htmlStr = ` <van-cell class="cell">
      <div  class="integral_wrap" style="margin:0px auto">
      <div class="integral_content"><img src="${jkc}" style="width:4px;height:12px;margin:0 4px 0 0"/>奖扣指标</div>
      <van-grid square :border="false" :column-num=4  class="flex_wrap">
        <van-grid-item class="item">
            <span class="fontWrap">${ list.rewardTask.limit_reward_code}<font>(${list.rewardTask.actual_reward_code})</font> </span><br/>
            <span >奖分指标<font>(完成)</font></span>
        </van-grid-item>
        <van-grid-item  class="item">
            <span class="fontWrap">${list.rewardTask.limit_deduction_code}<font>(${list.rewardTask.actual_deduction_code})</font> </span><br/>
            <span>扣分指标<font>(完成)</font></span>
        </van-grid-item>
        <van-grid-item  class="item">
          <span class="fontWrap">${list.rewardTask.person_time}<font>(${list.rewardTask.actual_person_time})</font> </span><br/>
          <span>目标人数<font>(完成)</font></span>
        </van-grid-item>
        <van-grid-item class="item">
            <span class="redfont fontWrap2">${list.rewardTask.total_deduction}</span><br/>
            <span>未完成扣分</span>
        </van-grid-item>
      </van-grid>
      </div>
    </van-cell >`
      break;
      case 3 :
      htmlStr = `<van-cell    class="cell">
      <div class="integral_wrap " style=" margin:0px auto" >
        <div class="integral_content"><img src="${sph}" style="width:4px;height:12px;margin:0 4px 0 0"/>待我审核</div>
        <div  style="height: 0px;position: relative;margin: 0px;text-align: left;z-index: 1;">
          <img src="${sjq}" style="position: absolute;left:3%;top:10px;width:14px;height:14px;" />
          <img src="${rw}" style="position: absolute;left:53%;top:10px;width:14px;height:14px;" />
          <div style="width:0px;height:32px;border-left:1px solid #808080; position: absolute;z-index: 1;top: 21px;left: 50%;"></div>
        </div>
         <van-grid  class="examine">
         <div class="event">
          <van-grid-item class="events">
              <span class="redfont fontWrap" style="position:relative" >${list.toexamine.event.first}
                <li style="position:absolute;top:-2px;right:-2px; width:3px;height:3px;background-color:red;border-radius:50%"></li>
                 </span><br/>
              <span>待初审</span>
          </van-grid-item>
          <van-grid-item class="events">
              <span class="redfont fontWrap">${list.toexamine.event.end}
                </span><br/>
              <span>待终审</span>
          </van-grid-item> 
          </div>
          <div class="task">
          <van-grid-item class="task1">
              <span class="redfont fontWrap">${list.toexamine.task.toexamine} </span><br/>
              <span>待审核</span> 
          </van-grid-item>
          <van-grid-item class="tasks">
              <span class="redfont fontWrap">${list.toexamine.task.tobeaccepted}</span><br/>
              <span>待验收</span>
          </van-grid-item>
          </div>
        </van-grid>
    </van-cell>`
      break;
      case 4 :
      htmlStr = `<van-cell   class="cell">
      <div class="integral_wrap" >
        <div class="integral_content" ><img src="${jfl}" style="width:4px;height:12px;margin:0 4px 0 0"/>积分申请</div>
        <van-grid square :border="false" :column-num=4 class="flex_wrap">
          <van-grid-item class="item">
              <span  style="position:relative" class="redfont fontWrap" > ${list.integralData.underreview}
              <li style="position:absolute;top:-2px;right:-2px; width:3px;height:3px;background-color:red;border-radius:50%"></li>
              </span><br/>
              <span>审核中</span>
          </van-grid-item>  
          <van-grid-item class="item">
              <span class="fontWrap">${list.integralData.adopt} </span><br/>
              <span>通过</span>
          </van-grid-item>
          <van-grid-item class="item">
              <span class="redfont fontWrap">${list.integralData.reject}</span><br/>
              <span>驳回</span>
          </van-grid-item>
          <van-grid-item class="item">
              <span class="fontWrap">${list.integralData.withdraw}</span><br/>
              <span>撤回</span>
          </van-grid-item>
        </van-grid>
        </div>
      </van-cell>`
      break;
      case 5 :
      htmlStr = `<van-cell  class="cell">
      <div class="integral_wrap">
        <div class="integral_content"><img src="${jfl}" style="width:4px;height:12px;margin:0 4px 0 0"/>积分任务</div>
        <van-grid square :border="false" :column-num=4  class="flex_wrap">
          <van-grid-item class="item">
              <span class="redfont fontWrap" style="position:relative">${list.integralTask.haveInHand}
                <li style="position:absolute;top:-2px;right:-2px; width:3px;height:3px;background-color:red;border-radius:50%"></li>
                </span><br/>
              <span>进行中</span>
          </van-grid-item>
          <van-grid-item class="item">
              <span class="fontWrap">${list.integralTask.adopt}</span><br/>
              <span>通过</span>
          </van-grid-item>
          <van-grid-item class="item">
              <span class="redfont fontWrap">${list.integralTask.reject}</span><br/>
              <span>驳回</span>
          </van-grid-item>
          <van-grid-item class="item">
              <span class="fontWrap"> ${list.integralTask.toBeAccepted}</span><br/>
              <span>被验收</span>
          </van-grid-item>
        </van-grid>
      </div>
    </van-cell>`
      break;
  } 
  return htmlStr;
}
export {getHtml} 
